home *** CD-ROM | disk | FTP | other *** search
/ Aminet 1 (Walnut Creek) / Aminet - June 1993 [Walnut Creek].iso / aminet / os20 / cli / noborder.lha / NoBorder.e < prev    next >
Text File  |  1993-03-23  |  2KB  |  60 lines

  1. /***************************************************************************/
  2. /* NoBorder v1.0 - makes screen as big as possible, then remove border and */
  3. /*                 attached gadgets, more or less the same as Border v1.1  */
  4. /*                 by Torsten Jueryeleit but intuition friendly so will    */
  5. /*                 run with all versions of workbench. Also includes a     */
  6. /*                 check for NTSC.                                         */
  7. /*                                                                         */
  8. /*  Author: Greg Hughes.                                                   */
  9. /* Version: 1.1 (22/03/1993)                                               */
  10. /*                                                                         */
  11. /* This program is freeware. Written in Amiga E!!                          */
  12. /***************************************************************************/
  13.  
  14. PROC main()
  15. DEF swptr,ssptr,f
  16.  
  17. /* Formfeed, makes sure a window is present before try to mess with it */
  18. f:=12
  19. WriteF('\c',f)
  20.  
  21. /* Find current window, i.e. CLI window */
  22. swptr := Long(intuitionbase+52)
  23.  
  24. /* Find current screen */
  25. ssptr := Long(intuitionbase+56)
  26.  
  27.  
  28.    /* Make Window.MinWidth & Window.MinHeight zero */
  29.    PutLong(swptr+16,0)
  30.  
  31.    /* Move to 0,0 and make as small as possible */
  32.    IF ( (Int(swptr+4) <> 0) OR (Int(swptr+6) <> 0) )
  33.       MoveWindow(swptr,(0-Int(swptr+4)),(0-Int(swptr+6)))
  34.    ENDIF
  35.    SizeWindow(swptr,(1-Int(swptr+8)),(1-Int(swptr+10)))
  36.  
  37.    /* Window.Flags */  
  38.    PutLong(swptr+24,2048)
  39.    /* Window.Title */
  40.    PutLong(swptr+32,0) 
  41.    /* Window.Borders */
  42.    PutLong(swptr+54,0)
  43.    /* Window.FirstGadget */
  44.    PutLong(swptr+62,0)
  45.  
  46.    /* Make as large as possible but now we should be borderless */
  47.    SizeWindow(swptr,(Int(ssptr+12)-1),(Int(ssptr+14)-1) )
  48.    /* Move In Front of other windows */
  49.    WindowToFront(swptr)
  50.  
  51. /* If we haven't any arguments print out banner */
  52. IF (StrLen(arg) = 0)
  53.    WriteF('\e[1mNoBorder v1.1\e[0m © Greg Hughes 1993\n\n')
  54.    WriteF('Makes current window as big as possible and removes border.\n')
  55.    WriteF('Workbench 2.x+ & NTSC friendly!!\n')
  56.    WriteF('execute command with argument to avoid this text.\n\n')
  57. ENDIF
  58.  
  59. ENDPROC
  60.